package avicit.bdp.dcs.detail.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @金航数码科技有限责任公司
 * @作者：liyb
 * @邮箱：liyb@avic-digital.com
 * @创建时间： 2023-03-28 11:03
 * @类说明：
 * @修改记录：
 */
@ApiModel(value = "TaskTableLogDTO", description = "bdp_task_instance_table_log")
@Table(name = "bdp_task_instance_table_log")
public class TaskTableLogDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @LogField
    @ApiModelProperty(value = "主键")
    @FieldRemark(column = "id", field = "id", name = "主键")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 流程实例id
     */
    @LogField
    @ApiModelProperty(value = "流程实例id")
    @FieldRemark(column = "process_instance_id", field = "processInstanceId", name = "流程实例ID")
    @Column(name = "process_instance_id")
    private String processInstanceId;

    /**
     * 任务实例id
     */
    @LogField
    @ApiModelProperty(value = "任务实例id")
    @FieldRemark(column = "task_instance_id", field = "taskInstanceId", name = "任务实例id")
    @Column(name = "task_instance_id")
    private String taskInstanceId;

    /**
     * 创建表日志
     */
    @LogField
    @ApiModelProperty(value = "创建表日志")
    @FieldRemark(column = "table_log", field = "tableLog", name = "创建表日志")
    @Column(name = "table_log")
    private String tableLog;

    @Override
    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "表同步日志";
        } else {
            return super.logFormName;
        }
    }

    @Override
    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "表同步日志";
        } else {
            return super.logTitle;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getTaskInstanceId() {
        return taskInstanceId;
    }

    public void setTaskInstanceId(String taskInstanceId) {
        this.taskInstanceId = taskInstanceId;
    }

    public String getTableLog() {
        return tableLog;
    }

    public void setTableLog(String tableLog) {
        this.tableLog = tableLog;
    }

}